import React from 'react'


import { NavLink } from "react-router-dom";


export default class Parent extends React.Component {


    render() {

        return (
            <div>
                <h3>Parent组件</h3>

                <ul>

                    {/* exact  去除 跟路径下高亮 */}

                    <li>
                        <NavLink exact to='/parent/child1'>child1</NavLink>
                    </li>
                    <li>
                        <NavLink to='/parent/child2'>child2</NavLink>
                    </li>
                 
                </ul>


                <div>{this.props.children}</div>



            </div>
        )
    }
}